The present invention relates to an image processing method and apparatus for detecting a closed-loop area of an image on a document and for generating a paint signal and an area detection signal based on the area detection result, to print a copy in which the inside of the closed-loop area is painted. The image processing method and apparatus are applied to digital copiers, facsimile machines, image scanners, and the like.
With recent development of image processing technology, an image processing system applied to digital copiers or facsimile machines and capable of editing an image, as well as capable of copying, receiving or transmitting the image has been proposed. One of image editing functions of the image processing system is to trim or paint the inside of a closed-loop area indicated by a special mark on a document.
The closed-loop area to be trimmed or painted is indicated by a special color mark which is manually drawn on a document using a color pen. In order to achieve the trimming function mentioned above, the image processing system must correctly detect the closed-loop area on the document. The optical density of the closed-loop area is assumed to fall within a given range. In the above mentioned system, it is necessary to generate an area detection signal indicating whether a dot of image data read from the document lies in the inside of the closed-loop area or on the outside thereof, so that the inside of the closed-loop area can be trimmed or painted in accordance with the area detection signal.
However, in a conventional image processing system, it is difficult to correctly detect whether a dot lies in the inside of a closed-loop area or on the outside thereof no matter what type of the closed-loop area is present on a document. For example, when a certain type of a closed-loop mark shown in FIG. 1A is present on a document, the above mentioned system erroneously detects dots on the outside of the mark as lying in the inside of a closed-loop area. In other words, the system detects dots in an area indicated by a letter "E" in FIG. 1A as lying a concealed portion of the closed-loop mark, even if the dots in the indicated area are processed in any of three directions indicated by arrows "A", "B" and "C" in FIG. 1A.
In another case where a double closed-loop mark having an external mark "MARK-1" and an internal mark "MARK-2" shown in FIG. 1B is present on a document, it is likely that the internal mark "MARK-2" in the double closed-loop mark will be disregarded. As a result, in the conventional system, dots in an area indicated by a letter "E" in FIG. 1B are detected as lying in the inside of a closed-loop area. The dots in the area "E" are not detected as lying on the outside of the internal mark "MARK-2" and in the inside of the external mark "MARK-1". Since a paint signal is generated in accordance with a detection signal for each of the errorneously detected dots, a copy in which the entire area in the inside of the double closed-loop mark is painted is produced. Thus, it is difficult for the conventional system to correctly perform the trimming or painting function no matter what type of a closed-loop area is present on a document.